package com.tfswue.jqr.apis;

import com.tfswue.jqr.entity.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(name = "user-server")
public interface UserClinet {
    // 复制UserController中的方法，除了方法体，
    // GetMapping中的路径要自行拼接父路径
    @GetMapping("/api/users/{id}")
    public User getUserById(@PathVariable("id") Long id);
}
